﻿@inherits LayoutComponentBase

<PageTitle>BlazorServerApp</PageTitle>

<div class="page">
    <div class="sidebar">
        <NavMenu />
    </div>

    <main>
        <div class=@(isEnhancementEnabled ? "enhanced-top-row px-4" : "top-row px-4")>
            <a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
        </div>

        <article class="content px-4">
            @Body
        </article>
    </main>
</div>

@inject IFeatureManagerSnapshot _featureManager

@code {
    private bool isEnhancementEnabled;

    protected override async Task OnInitializedAsync()
    {
        isEnhancementEnabled = await _featureManager.IsEnabledAsync("BrowserEnhancement");
    }
}